package com.ericsson.mq.domain;

public enum Severity {

    Major(1),
    Critical(2),
    Minor(3),
    Warning(4),
    Cleared(5);

    private Integer value;

    public Integer value() {
        return value;
    }

    Severity(Integer value) {
        this.value = value;
    }

    public static Severity resolve(Integer value) {
        for (Severity severity : values()) {
            if (severity.value().equals(value)) {
                return severity;
            }
        }
        return null;
    }

}
